export function checktoken() {
  let userinfo = localStorage.getItem('userinfo');
  if (!userinfo) {
    localStorage.removeItem('userinfo');
    // console.log('登录已过期');
    return;
  }
  let dataObj = JSON.parse(userinfo);
  let sex = 7 * 24 * 60 * 60 * 1000;
  if (new Date().getTime() - dataObj.last_login > sex) {
    localStorage.removeItem('userinfo');
    // console.log('登录已过期');
  } else {
    // console.log('登录中');
  }
}
